<?php
/**
 * Introduction: 商品分类表  product_cat
 */

namespace Common\Model;


use Think\Model;

class ProductCatModel extends Model
{
    //定义数据库连接信息
    protected $connection;

    //定义表名
    protected $tableName = 'product_cat';

    /**
     * 初始化
     */
    public function _initialize()
    {

        $this->connection = C('Databaese');

    }

    /**
     * 获取分类下所有分类
     *
     */
    public function cat_list($catid){
        $list = $this->where("catid like '$catid%' and isindex=1")->field("catid,cat")->select();
        return $list;
    }
}